package strategy3;

import org.reflections.Reflections;
import strategy1.pay.IPayment;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class MapUtilCollect {


    public static Map<String,Class> getAllIPaymentImpl(){
        Reflections reflection=new Reflections("strategy1.pay");
        Map<String,Class> map=new HashMap<>();
        Set<Class<? extends IPayment>> set=reflection.getSubTypesOf(IPayment.class);
        for(Class c:set){
            map.put(c.getSimpleName(),c);
        }
        return map;
    }
}
